<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>个人中心</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/common.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    	<link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
      <style>
          html, body {width: 100%;min-height: 100%;background: #F3EFEE;}
          .aui-active .aui-bar-tab-label{
            color: #f5a51c
          }
          .login {height:240px;background-image: -webkit-linear-gradient(0deg, #f5c674, #ed824c);/*background-image: url(../../image/personal_bkg.jpg);background-repeat: no-repeat; background-size: cover;*/position: relative;}
      	.login .personal_logo {width: 4rem;height: 4rem;border-radius: 50%;margin: 0 auto 9px;/*position: absolute; top: 60px; left: 20px;*/}
      		.login .userinfo {position: absolute; top: 60px;text-align: center; left: 0; right: 0;}
      		.login .userinfo .title {font-size: 0.8rem; color: #fff;}

      		/* 设置条目 */
      		.item {height: 3rem;line-height: 3rem;padding-left: 0.7rem;background-color: #fff;}
      		.item_ico {float: left;width: 2.3rem;padding: 0.7rem 0.7rem 0.7rem 0;}
      		.item_arrow {float: right;width: 1.5rem;padding: 1rem 0.7rem 1rem 0;}
      		.item span {font-size: 0.7rem;}
          [v-cloak] {
              display: none;
          }
          .aui_list{
              background-image: linear-gradient(0,#eee,#eee 50%,transparent 50%);
          }
          .aui-list-item{
              background-image:linear-gradient(0,#eee,#eee 50%,transparent 50%) !important;
          }
          .aui-radio:checked{
            background-color: #f23030;
            border: solid 1px #f23030;
          }
          #app {
            padding-bottom: 2.5rem!important;
          }
          .h10 {
            height: 0.5rem;
            background: #F3EFEE;
          }
          .apply_footer_btn {
            position: fixed!important;
            width: 100%;
            bottom: 0;
          }
          .aui-list.aui-media-list .aui-list-item {
            background-size: 100% 0;
          }
          .aui-list.aui-media-list .aui-list-item > div {
            box-align: inherit;
     -webkit-align-items: inherit;
     align-items: inherit;
          }
          .aui-list.aui-media-list .aui-list-item:nth-child(2) .aui-list-item-text .aui-list-item-title {
            color: #f23030
          }
          .aui-list.aui-media-list .aui-list-item .line_outer {
            text-align: center;
          }
          .aui-list.aui-media-list .aui-list-item .line_outer::after {
            content: '';
            display: block;
            height: 2rem;
            width: 1px;
            background: #999;
            margin: 0.5rem auto;
          }
          .aui-list.aui-media-list .aui-list-item:first-child .line_outer::before,
          .aui-list.aui-media-list .aui-list-item:last-child .line_outer::after {
            display: none;
          }
          .aui-refresh-content {
            min-height: 100vh;
          }
          .progress {

          }
          .progress li {
            width: 100%;
            height: 0.3rem;
            position: relative;
            background: #ccc;
            border-radius: 0.3rem;
          }
          .progress li::before {
            content: '';
            width: 0.8rem;
            height: 0.8rem;
            border-radius: 50%;
            position: absolute;
            left: 0;
            top:0;
            bottom: 0;
            margin: auto;
            background: #f23030;
          }
          .progress li::after {
            content: '';
            width: 0.8rem;
            height: 0.8rem;
            border-radius: 50%;
            position: absolute;
            right: 0;
            top:0;
            bottom: 0;
            margin: auto;
            background: #ccc;
          }
          .progress li.active {
            background: #f23030;
          }
          .progress li.active::after {
            background: #f23030;
          }
          .progress_txt {
            font-size: 0;
          }
          .progress_txt li {
            display: inline-block;
            font-size: 0.7rem;
            margin-top: 0.8rem;
          }
          .progress_txt li:first-child {
            margin-left: -1rem;
          }
          .progress_txt li:last-child {
            margin-right: -1rem;
            float: right;
          }
          .refund {
            padding: 0.5rem 0.75rem;
            background: #fff;
          }
          .refund li {
            margin: 0.2rem 0;
            color: #666;
          }
      </style>
  </head>
  <body>
<div id="app" v-cloak>

<div class="user_nav_line"></div>
  <div class="aui-refresh-content">
    <div class="aui-content">
        <ul class="aui-list aui-media-list" v-if="info.refund">
            <li class="aui-list-item aui-list-item-middle" style="padding: 1rem 2.75rem">
              <ul class="progress">
                <li v-if="info.refund.refund_status == 1">

                </li>
                <li class="active" v-else-if="info.refund.refund_status == 2">

                </li>
              </ul>
              <ul class="progress_txt">
                <li>提交申请</li>
                <li>退款成功</li>
              </ul>
            </li>
            <li class="aui-list-item-middle" v-if="info.goods" v-for="item in info.goods" style="background:#F3EFEE;padding: 0 0.75rem">
              <div class="aui-media-list-item-inner">
                  <div class="aui-list-item-media" style="width: 4rem;">
                      <img :src="item.goods_pic" class="aui-list-img-md">
                  </div>
                  <div class="aui-list-item-inner">
                      <div class="aui-list-item-text">
                        <div  class="aui-list-item-title" style="width: 70%;">
                          <div class="aui-font-size-14">{{item.goods_name}}</div>
                          <div class="aui-list-item-text">{{item.sku_info}}</div>
                       </div>
                          <div class="aui-list-item-right" style="text-align:right;">
                            <div>×{{item.goods_nums}}</div>
                          </div>
                      </div>
                  </div>
              </div>
           </li>
           <li v-if="info.refund" class="refund">
             <ul>
               <li>退款原因：{{info.refund.return_reson}}</li>
               <li>退款金额：{{info.refund.refund_money}}</li>
               <li>申请时间：{{info.refund.addtime}}</li>
               <li>退款编号：{{info.refund.return_no}}</li>
             </ul>
           </li>
        </ul>
    </div>
  </div>

</div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/zepto.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/utils.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/aui-tab.js"></script>
  <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  <script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
  <script type="text/javascript" src="../../script/aui-popup.js"></script>
  <script type="text/javascript" src="../../script/aui-dialog.js"></script>
  <script type="text/javascript">

    apiready = function(){


      api.showProgress({
          title: '努力加载中...',
          text: '先喝杯茶...',
          modal: false
      });
      var app = new Vue({
          el: '#app',
          data: {
            info: {},
            reason_id: 0,
            reason: '请选择',
            content: ''
          },
          created: function() {
              var $this = this;
              $this.getOrder()
          },
          mounted: function() {
              var $this = this;
              api.hideProgress();
              var pullRefresh = new auiPullToRefresh({
                  container: document.querySelector('.aui-refresh-content'),
                  triggerDistance: 100
              }, function(ret) {
                  if (ret.status == "success") {
                    $this.getOrder(function () {
                      setTimeout(function () {
                        pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
                      }, 500)
                    })
                  }
              })
          },
          methods: {
            getOrder: function (fn) {
                var $this = this;
              api.ajax({
                  url: window.Url.Freeorder_refundDetail,
                  method: 'post',
                  data: {
                      values: {
                          token: $api.getStorage('token'),
                          orderId: api.pageParam.id,
                      }
                  }
              }, function(ret, err) {
                  if (ret) {
                    console.log(JSON.stringify(ret))
                      $this.info = ret.data
                      fn && fn()
                  } else {
                      api.alert({
                          msg: JSON.stringify(err)
                      });
                  }
              })
            }
          }
      })
    };


  </script>
  </html>
